<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改页面</title>
<script type="text/javascript" src="/ssm01/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#btn").click(function(){
	  $("#form1").submit();
  })
});
</script>
</head>
<body>
<form action="/ssm01/emp/empUpdate" method="post" id="form1">
<input type="hidden" name="id" value="emp.id">
员工名称:<input type="text" name="ename" value="${emp.ename}">
部门名称:<select name="dept.did" >
<option value="-1">请选择</option>
<c:forEach items="${list }" var="d">
<option value="${d.did }"
<c:if test="${d.did==emp.dept.did }">selected=selected</c:if>>${d.dname }
</option>
</c:forEach>
</select><br>
生日:<input type="date"  name="birthday" value='<f:formatDate value="${emp.birthday }" pattern="yyyy-MM-dd"/>'/><br>
头像:<input type="file" name="file" >
<img width="50" height="50" alt="" src="http://localhost:8080${emp.photo }"><br>
性别:<input type="radio" name="sex" value="1" 
<c:if test="${emp.sex=='1'}">checked==checked</c:if>/>男
<input type="radio" name="sex" value="2" 
<c:if test="${emp.sex=='2'}">checked==checked</c:if>/>女
<input type="submit" value="保存">
</form>
</body>
</html>